package org.hegang.design.second.dynamic;

public class Main {
    public static void main(String[] args) {
        Me me = new Me();
        ProxyClass proxyClass = new ProxyClass();
        proxyClass.setMarry(me);

        // 生成代理对象
        Object proxy = proxyClass.getProxy();
        Marry marry = (Marry) proxy;
        marry.helloMarry();
    }
}
